<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      let promise = Promise.resolve();

      promise
        .then(() => {
          console.log("promise done!");
          //   return Promise.resolve();
        })
        .then(() => {
          console.log("code finished"); // 这个 console.log 先显示
        });

      console.log("hello");
    </script>
  </body>
</html>
